package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86136
 * Date: 2024-05-23
 * Time: 13:02
 */
public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("大黄",3);
        System.out.println("-------------");
        Dog dog1 = new Dog("小黄",3);

    }
    public static void main2(String[] args) {
        Dog dog = new Dog("大黄",3);
        System.out.println(dog.toString());
        Cat cat = new Cat("小黑",2);
        System.out.println(cat.toString());

        dog.bark();
    }
    public static void main1(String[] args) {
        /*Dog dog = new Dog();
        dog.name = "大黄";
        dog.age = 3;
        System.out.println(dog.toString());
        dog.eat();
        dog.bark();
        System.out.println("------------");
        Cat cat = new Cat();
        cat.name = "小黑";
        cat.age = 2;
        System.out.println(cat.toString());
        cat.eat();
        cat.mimi();
*/
    }
}
